<?php
class SkillsController extends AppController {
    var $name = 'Skills';
    //var $scaffold;
    
    function sadd()
    {
        if(isset($this->data))
        {
            $this->Skill->save($this->data);
            $this->redirect('../skills/slist');
        }
    }
    function sdelete($id)
    {
        $this->autoRender = false;
        $this->Skill->id = $id;
        $this->Skill->delete();
        $this->redirect('../skills/slist');
    }
    function sedit($id)
    {
        
        if(isset($this->data))
        {
            $this->Skill->id = $id;
            $this->Skill->save($this->data);
            $this->redirect('../skills/slist');
        }
        $this->set('sk', $this->Skill->findByid($id));
    }
    function slist()
    {
        $this->set('slist',($this->Skill->find('all')));
    }
    }
?>